<?phpnamespace app\api\model\food;use app\common\model\food\Pact as PactModel;/** * 预约模型 */class Pact extends PactModel{    /**     * 获取列表     */    public function getUserPact($user_id)    {        //筛选        $filter['user_id'] = $user_id;        // 排序规则        $sort = [];        $sort = ['pact_time' => 'asc'];//按照约定时间排序        // 执行查询        return $this->with(['shop'])            ->where($filter)            ->order($sort)            ->paginate(['list_rows'=>15,'query' => request()->param()]);    }}